#include <assert.h>
#include "accountdao_factory.h"
#include "accountdao_stub4web.h"
#include "accountdao_stub4app.h"
//#include "accountdao.h"

using namespace erp::account::dao;

bool CAccountDaoFactory::s_AccountDaoInit = false;

IAccountDao* CAccountDaoFactory::GetObject(enum ObjType_T obj_type)
{
    switch(obj_type)
    {
    case STUB4APP:
        return (new CAccountDaoStub4App);
/*适应container3
    case POCO:
    {
        if(!s_AccountDaoInit)
        {
            int iRetCode = CAccountDao::Initialize();
            assert(iRetCode == 0);
            s_AccountDaoInit = true;
        }   	
        return (new CAccountDao);
	}*/
    default:
        assert(0);
    };
    return NULL;
}

IAccountDaoAsyc* CAccountDaoFactory::GetAsycObject()
{
	return (new CAccountDaoStub4App);
}
